﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MagicCardManager
{
    class MCMModel
    {
        private object dbDataSet;

        #region DELEGATE
        public delegate void UpdateDataeventhandler(object sender, EventArgs e);
        public event UpdateDataeventhandler UpdateData;
        #endregion DELEGATE

        #region Constructor
        public MCMModel()
        {


            //... Add listeners to the view.
            //view.addMultiplyListener(new MultiplyListener());
            //view.addClearListener(new ClearListener());
        }
        #endregion Constructor

        #region EVENTS
        protected void OnGetNewData()
        {
            UpdateData(this, new DataChangedEventArgs(dbDataSet));
        }
        #endregion EVENTS
    }

    #region EVENTARGS
    public class DataChangedEventArgs : EventArgs
    {
        private object dbDataSet;

        public DataChangedEventArgs(object dbDS)
        {
            dbDataSet = dbDS;
        }

        public object DBDataSet
        {
            get
            {
                return (dbDataSet);
            }
        }
    }
    #endregion EVENTARGS
}
